package com.gxa.medical.exception;

/**
 * 通过枚举来设置异常
 */
public enum ExceptionCode {
    SERVER_FAILED("50000", "服务器开小差了,请稍后再试"),
    LOGIN_FAILED("50001", "登录失败,请检查用户名或密码是否正确"),
    DUPLICATE_USERNAME("50002","重复的用户名"),
    DELETE_USER_FAILED("50003","删除失败"),
    UPDATE_USER_FAILED("50004","修改失败"),
    SEND_SMS_FAILED("50005","发送失败"),
    WRONG_PHONE_NUMBER("50006","手机号格式不正确"),
    DUPLICATE_PHONE("50007","该手机号已注册"),
    WORNG_PHONE_FAILED("50008","没有找到该用户"),
    WORNG_TOKEN_FAILED("50009","没有权限"),
    NULL_TOKEN_FAILED("50010","token为空")
    ;
    ExceptionCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    private String code;
    private String msg;
}
